home *** CD-ROM | disk | FTP | other *** search
/ Delphi Programmer's Power Pack / Delphi Volume 1.iso / e_to_l / fbuilder / vb / demos / graphfrm.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-09-15  |  6.2 KB  |  140 lines

  1.     GraphForm
  2. Graphing Demo
  3. Form15
  4. Frame3D1
  5. SSFrame
  6. &Graph Options
  7. XNumPtsEdit
  8. XMaxEdit
  9. XMinEdit
  10. EqnEdit
  11.  Sin( Radians(x) ) * Cos( ln(X) )
  12. Label5
  13. # of Points to Plot
  14. Label4
  15. Label3
  16. Label2
  17. &Expression
  18. CloseBtn
  19.     SSCommand
  20. """"""""""""
  21. """""""""""" 
  22. """" """"""" 
  23. """""" 
  24. """""" 
  25. """" 
  26. """""
  27. """"" 
  28. """""
  29. """" 
  30. """" 
  31. """""""""""" 
  32. """""""""""" 
  33. """""""""""" 
  34. """""""""""" 
  35. """"""""""""
  36. PlotBtn
  37.     SSCommand
  38. Panel3D1
  39. SSPanel#
  40. Panel3D1
  41. FormulaGraph
  42. GRAPH
  43. Label1
  44. 5Please enter an expression in terms of the variable X
  45. Arial
  46. MaskedEdit1_ValidationError&
  47. InvalidText(
  48. StartPosition
  49. CloseBtn_Click
  50. CollectGraphOpts2
  51. XMinEdit
  52. XMaxEdit
  53. numpts
  54. NumPtsEdit
  55. Formula_
  56. FormulaEdit
  57. Except
  58.     DispErrorp
  59. Result
  60. @    PlotGraph
  61. Ydatai
  62. xDelta
  63. XdataB
  64. errcodeg
  65. returntype
  66. graphExprH
  67. FBInitExpression
  68. FBAddVariable
  69. EXPR_SUCCESSM
  70. DisplayErrorMessage
  71. FBSetExpressiont
  72. FBGetReturnType
  73. vtFLOAT
  74. EqnPlotter
  75. Visible
  76.     NumSeries
  77.     ThisSerie
  78.     errorcode
  79. FBSetFloatVariableB
  80. FBGetFloatResult
  81.     GraphData
  82. XPosData
  83. TopTitle
  84. BottomTitle
  85. EqnEdit
  86.     NumPoints_
  87. AutoInc
  88. XNumPtsEdit
  89. FormulaGraph
  90. ThisSet
  91. DrawMode
  92. GraphCaption
  93. GraphTitle
  94. MB_ICONHAND
  95. PlotBtn_Click
  96. DoPlotGraph
  97. Xnumpts
  98.     ThisPoint
  99. between
  100. CloseBtn_Click
  101. CollectGraphOpts
  102. Maximum less than minimum value
  103. Number of points must be >= 2
  104. Formula must be non blank
  105.  CollectGraphDatah    
  106. DoPlotGraph
  107. PlotBtn_Click
  108. PlotGraph
  109.  FormulaBuilder Visual Basic (tm) Graphing Demo 
  110.  Plots the graph of Formula$ for numpts% evenly spaced values of the variable x 
  111.  between XMin# and XMax#
  112.  Assumptions :
  113.    Formula$ contains an expression in terms of a variable X,
  114.  e.g. "Sin( radians(x) ) + Cos( ln(X) )m
  115.    Xmin# < XMax#, numpts% >= 2 s
  116.    There is a VB Graph control on the form named FormulaGraph
  117. Cannot initialize graph expression
  118.  Add a float variable to the engine. FormulaBuilder manages it
  119.  it for yout
  120.  Set the expression text for the graph
  121.  At this point, were only interested in floating point types
  122. Floating point expression expected
  123.  Determine x increment value based on xmin,xMax and numpts%p
  124.  expand left and right endpoints by x increment 
  125.  Setup preliminary graph parameters 
  126.  delay painting until all points calculatedm
  127. Calculating .....
  128.  Set the beginning value of Xm
  129.  Doublet
  130.  Evaluate the formula for the current value of X
  131.  Pass values on to graph
  132.  Debug.Print "Xdata = ", Xdata#, " Ydata = ", Ydata#
  133.  increment our loop countx
  134.  calculate new value of xx
  135.  Set x variable to new value
  136. Graph Of : 
  137.    FormulaGraph.BottomTitle = "X Values"
  138. repaint graphi
  139.  PlotGraph    
  140.